package com.example.myandroidtest.ui.thread;

import android.os.Binder;
import android.os.Bundle;
import android.os.HandlerThread;
import android.os.Message;
import android.os.MessageQueue;
import android.view.Window;

import androidx.appcompat.app.AppCompatActivity;

import com.example.myandroidtest.databinding.ActivityProcessBinding;

public class ProcessActivity extends AppCompatActivity {

    ActivityProcessBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityProcessBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        initView();
        HandlerThread handlerThread = new HandlerThread("handlerThread");
//        surface
//        wait();
//        Thread.sleep(1000);
//        Message.obtain()
        MessageQueue.IdleHandler idleHandler;
        Message message;
    }

    private void initView() {
        binding.toolbar.ivBack.setOnClickListener(v -> finish());
        binding.toolbar.tvTitle.setText("线程");

        binding.btnClick.setOnClickListener(v -> {
        });

        Window window;
//        SurfaceFlinger

        Binder binder = new Binder();
//        synchronized ()
        //linux
        //驱动
    }
}